import 'package:flutter/material.dart';
import 'package:json_annotation/json_annotation.dart';

part 'taste.g.dart';

@JsonSerializable(explicitToJson: true)
class Taste {
  Taste();

  int tasteId;
  int storeId;
  String storeName;
  int commodityId;
  String tasteName;
  String tasteLabel;

  @JsonKey(ignore: true)
  List<Label> labels;

  factory Taste.fromJson(Map<String, dynamic> json) => _$TasteFromJson(json);

  Map<String, dynamic> toJson() => _$TasteToJson(this);
}

class Label {
  String label;
  Key key;

  Label({this.label}) : key = GlobalKey();
}
